 package sump;/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
 

import java.awt.Graphics2D;

/**
 *
 * @author Diegolas
 */
public class MapaPrueba extends Mapa{

    
    public MapaPrueba() {
        this.mapeado = new Tile[20][50];
        
        for (int i = 0; i<20; i++)
        {
            this.mapeado[i][0] = TileList.tierra;
        }
        for (int i = 0; i<20; i++)
        {
            this.mapeado[i][49] = TileList.tierra;
        }
        for (int i = 0; i<50; i++)
        {
            this.mapeado[0][i] = TileList.tierraPasto;
        }
        for (int i = 0; i<50; i++)
        {
            this.mapeado[19][i] = TileList.tierraPasto;
        }
        
        this.mapeado[11][1] = TileList.tierraPasto;
        this.mapeado[12][1] = TileList.tierra;
        this.mapeado[13][1] = TileList.tierra;
        this.mapeado[13][2] = TileList.tierraPasto;
        this.mapeado[13][3] = TileList.tierraPasto;
        this.mapeado[13][4] = TileList.tierraPasto;
        this.mapeado[13][5] = TileList.tierraPasto;
        this.mapeado[13][6] = TileList.tierraPasto;
        this.mapeado[9][6] = TileList.tierraPasto;
        this.mapeado[9][5] = TileList.tierraPasto;
        this.mapeado[13][7] = TileList.tierraPasto;
        this.mapeado[13][8] = TileList.tierraPasto;
        this.mapeado[13][9] = TileList.tierraPasto;
        this.mapeado[13][10] = TileList.tierraPasto;
        this.mapeado[13][11] = TileList.tierraPasto;
        this.mapeado[13][12] = TileList.tierraPasto;
        this.mapeado[13][13] = TileList.tierra;
        this.mapeado[12][13] = TileList.tierra;
        this.mapeado[11][13] = TileList.tierraPasto;
        this.mapeado[11][14] = TileList.tierraPasto;
        this.mapeado[11][15] = TileList.tierraPasto;
        this.mapeado[11][16] = TileList.tierraPasto;
        this.mapeado[11][17] = TileList.tierraPasto;
        this.mapeado[12][19] = TileList.tierraPasto;
        this.mapeado[11][18] = TileList.tierraPasto;
        this.mapeado[11][20] = TileList.tierraPasto;
        this.mapeado[11][21] = TileList.tierraPasto;
        this.mapeado[11][22] = TileList.tierraPasto;
        this.mapeado[11][23] = TileList.tierraPasto;
        this.mapeado[11][24] = TileList.tierraPasto;
        this.mapeado[11][25] = TileList.tierraPasto;
        this.mapeado[12][26] = TileList.tierraPasto;
        this.mapeado[13][27] = TileList.tierraPasto;
        this.mapeado[14][28] = TileList.tierraPasto;
        this.mapeado[15][29] = TileList.tierraPasto;
        
        
        this.jugadores = new Jugador[10];
        this.jugadores[0] = new Marissa();
        this.jugadores[0].setX(200);
        this.jugadores[0].setY(200);
    }
    

    public void actualizar(double dt, boolean[] teclas) {
        this.jugadores[0].actualizar(dt, teclas, mapeado);
    }

 
    public void pintar(Graphics2D g2D) {
//        g2D.scale(0.5, 0.5);
        g2D.translate((int)(-jugadores[0].getX())+(VariableList.ancho/2),(int)(-jugadores[0].getY())+(VariableList.alto/2));
        for(int i = 0; i<mapeado.length; i++)
        {
            for (int j = 0; j<mapeado[i].length; j++)
            {
                if (mapeado[i][j]!=null)
                {
                    g2D.drawImage(mapeado[i][j].tileImg, j*50, i*50, null);
                }
            }
        }
        
        this.jugadores[0].pintar(g2D);
        
    }

    
}
